import request from '@/utils/request.js'
// import store from '@/store/index.js'
// 获取用户的基本信息
export const userInfoAPI = () => {
  return request({
    method: 'get',
    url: '/my/userinfo'
    // headers: {
    //   Authorization: store.state.userModule.token
    // }
  })
}
// 获取左侧菜单列表
export const leftListAPI = () => {
  return request({
    url: '/my/menus',
    method: 'get'
  })
}
// 更新用户的基本信息
export const updateUserInfoAPI = (data) => {
  return request({
    url: '/my/userinfo',
    method: 'put',
    data
  })
}
// 更换头像
export const updateUserAvatarAPI = (data) => {
  return request({
    url: '/my/update/avatar',
    method: 'patch',
    data
  })
}
// 重置密码
export const updateUserPasswordAPI = (data) => {
  return request({
    url: '/my/updatepwd',
    method: 'patch',
    data
  })
}
